﻿Imports System.Windows.Forms

Public Class Dialog4

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub Label1_Click(sender As System.Object, e As System.EventArgs) Handles Label1.Click

    End Sub

    Private Sub Label2_Click(sender As System.Object, e As System.EventArgs) Handles Label2.Click

    End Sub

    Private Sub NumericUpDown2_ValueChanged(sender As System.Object, e As System.EventArgs) Handles NumericUpDown2.ValueChanged
        If NumericUpDown2.Value < NumericUpDown1.Value Then
            NumericUpDown1.Value = NumericUpDown2.Value
        End If
    End Sub

    Private Sub NumericUpDown1_ValueChanged(sender As System.Object, e As System.EventArgs) Handles NumericUpDown1.ValueChanged
        If NumericUpDown1.Value > NumericUpDown2.Value Then
            NumericUpDown2.Value = NumericUpDown1.Value
        End If
    End Sub

    Public Function getfirstnumber() As Decimal
        Return NumericUpDown1.Value
    End Function

    Public Function getsecondnumber() As Decimal
        Return NumericUpDown2.Value
    End Function
End Class
